package com.wsx.ones.monitor.core.sample;

import java.util.Map;

/**
 * Created by wangshuaixin on 17/2/7.
 */
public class TestInterfaceImpl implements TestInterface {

    @Override
    public int add(int a, int b) {
        return a + b;
    }

    @Override
    public Person construct(Map<String, Object> map) {
        Person p = new Person();
        p.setName(String.valueOf(map.get("name")));
        p.setAge(Integer.valueOf(String.valueOf(map.get("age"))));
        return p;
    }
}
